Use of impedance threshold device during spontaneous ventilation